package com.biz.primus.ms.thirdlogin.dao.po;

import com.biz.primus.base.enums.ChannelTypes;
import com.biz.primus.model.thirdlogin.enums.OAuthTypes;
import com.biz.primus.ms.base.jpa.po.BaseEntityPKIncrement;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;

/**
 *
 * @author jun.liu
 * @date 2017-09-29
 */
@Entity
@Table(name = "oauth_member")
@Data
@EqualsAndHashCode(callSuper=true)
public class OAuthMember extends BaseEntityPKIncrement
{

    /**
     * 关联会员详情Member对象
     */
    @Column(name = "memberId")
    private Long memberId;

    /**
     * 类型
     */
    @Enumerated(EnumType.STRING)
    private OAuthTypes oAuthType;

    /**
     * id
     */
    @Column(name = "o_auth_id", nullable = false, unique = true, length = 32)
    private String oAuthId;

    /**
     * 最后一次绑定登录的渠道
     */
    @Enumerated(EnumType.STRING)
    private ChannelTypes channelType;
}
